// 获取全局应用程序实例对象
const app = getApp()

Page({
  data: {
    src: '',
    list:{}
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    console.log(options);
    this.setData({
      isIndex: options.index
    })
    if(options.index==0){
      wx.setNavigationBarTitle({ title: '联系客服' });
      this.setData({
        src: 'https://www.ausck.com/home/img/place_img.png'
      })
    }
    else{
     wx.setNavigationBarTitle({ title: '软件开发公司' });
     this.setData({
       src: 'https://www.ausck.com/home/img/software.png'
     })
    }

    var that = this;
    app.network.POST(
      'https://www.ausck.com/api/notice',
      {
        params: {},
        success: function (res) {
          console.log(res.data.data)
          //拿到解密后的数据，进行代码逻辑
          that.setData({
            list: res.data.data
          })


        },
        fail: function () {
          //失败后的逻辑  

        },
      })

    
  }
})